/*
  Symbol.toStringTag
    原理：Object.prototype.toString会读取该值

    适用场景：需自定义类型

    注意事项：兼容性
*/
class MyArray {
  /* get [Symbol.toStringTag]() {
    return "MyArray";
  } */

  [Symbol.toStringTag] = "MyArray";
}

const pf = console.log;
const a = new MyArray();
pf(Object.prototype.toString.call(a));
